﻿package com.game.module.backpack.view
{
	import base.BaseHero;
	
	import com.dusk.game.Logger;
	import com.dusk.util.ArrayUtil;
	import com.dusk.util.McUtil;
	import com.dusk.util.TextUtil;
	import com.game.data.constant.EquipType;
	import com.game.data.vo.EquipmentVO;
	import com.game.data.vo.PlayerDataVO;
	import com.game.engine.MainGame;
	import com.game.event.GameEvent;
	import com.game.event.GameEventType;
	import com.game.manager.EventManager;
	import com.game.manager.GameSceneManager;
	import com.game.manager.NotificationManager;
	import com.game.module.backpack.vo.BackPackEvent;
	import com.game.view.component.ComponentBase;
	import com.game.view.component.icon.RoleEquipIcon;
	import com.game.view.component.notification.TipBox;
	
	import export.strength.StrengthEquipment;
	
	import flash.display.GradientType;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Matrix;
	import flash.text.TextField;
	import flash.text.TextFormatAlign;
	
	public class PackThings extends ComponentBase
	{
		
		public function PackThings()
		{
			super();
		}
		
		public static const DISPLAY_TYPE_EQUIP:int = 1;
		public static const DISPLAY_TYPE_BAG_MESH:int = 2;
		
		private var numTxt:TextField;
		private var indicateTxt:TextField;
		private var equipIcon:RoleEquipIcon;
		private var equipVO:EquipmentVO;
		//三按钮面板
		private var threebtn:EquipFuncPanel;
		//所属类型栏目，包含装备、道具、时装、技能书
		private var whichType:uint = 1;
		public var displayType:int = DISPLAY_TYPE_BAG_MESH;
		
		override protected function beforeAdded():void
		{
			var mat:Matrix = new Matrix();
			mat.createGradientBox(50, 50, Math.PI / 2, 0, 0);
			graphics.lineStyle(1.5, 0, 1);
			graphics.beginGradientFill(GradientType.LINEAR, [0x824c23, 0xAA7852, 0x824c23], [1, 1, 1], [0, 128, 255], mat)
			graphics.drawRoundRect(0, 0, 48, 48, 5, 5);
			graphics.endFill();
			
			numTxt = TextUtil.creatTextField("", TextUtil.UNIVERSAL_FONT, 14, TextFormatAlign.RIGHT, 0xFF9900);
			numTxt.x = 0;
			numTxt.y = 30;
			numTxt.width = 50;
			numTxt.height = 20;
			numTxt.visible = true;
			addChild(numTxt);
			
			indicateTxt = TextUtil.creatTextField("", TextUtil.UNIVERSAL_FONT, 15, TextFormatAlign.CENTER, 0xF7F496);
			indicateTxt.x = 0;
			indicateTxt.y = 15;
			indicateTxt.width = 50;
			indicateTxt.height = 21;
			indicateTxt.visible = true;
			addChild(indicateTxt);
		}
		
		override protected function onAdded():void
		{
			addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
			EventManager.getIns().registerListen(BackPackEvent.REFRESH_NUMBER, setTxt);
		}
		
		override protected function onRemoved():void
		{
			removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
			EventManager.getIns().removeListen(BackPackEvent.REFRESH_NUMBER, setTxt);
		}
		
		public function setIndicateText(text:String):void
		{
			indicateTxt.text = text;
		}
		
		public function setTxtVisible(b:Boolean):void
		{
			numTxt.visible = b;
		}
		
		/**
		 * 设置装备vo
		 * 主入口，设置vo之后才会开启点击侦听
		 * @param vo
		 */
		public function setEquipVO(vo:EquipmentVO):void
		{
			if(vo == equipVO)
			{
				return;
			}
			if(equipIcon)
			{
				equipIcon.removeFromParent();
			}
			if (!vo)
			{
				equipVO = null;
				return;
			}
			equipVO = vo;
			equipIcon = new RoleEquipIcon(vo);
			addChild(equipIcon);
			setTxt();
			//equipIcon.addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
			equipIcon.addEventListener(MouseEvent.CLICK, clickHandler);
			setChildIndex(indicateTxt,0);
			setChildIndex(equipIcon,1);
			setChildIndex(numTxt,2);
		}
		
		public function getEquipVO():EquipmentVO
		{
			return equipVO;
		}
		
		public function removeSobj():void
		{
			equipIcon.removeEventListener(MouseEvent.CLICK, clickHandler);
			equipIcon.removeFromParent();
			removeSomeEquip(equipIcon.getEquipVO());
			equipIcon = null;
		}
		
		public function removeDaoJuSobj():void
		{
			var _loc1_:* = null;
			if (equipIcon.getEquipVO().num > 1)
			{
				equipIcon.getEquipVO().modifyNum(-1);
			}
			else
			{
				equipIcon.removeEventListener(MouseEvent.CLICK, clickHandler);
				removeChild(equipIcon);
				_loc1_ = equipIcon.getEquipVO();
				ArrayUtil.removeElement(getPlayer().bagEquipList, _loc1_)
				_loc1_ = null;
				equipIcon = null;
			}
			setTxt();
		}
		
		public function removeThreebtn():void
		{
			if (!(Boolean(threebtn) && contains(threebtn)))
			{
				return;
			}
			threebtn.removeEventListener(EquipFuncPanel.EVENT_EQUIP, wearClick);
			threebtn.removeEventListener(EquipFuncPanel.EVENT_SELL, sellClick);
			threebtn.removeEventListener(EquipFuncPanel.EVENT_USE, useClick);
			threebtn.removeEventListener(EquipFuncPanel.EVENT_ABANDON, abandonClick);
			threebtn.removeFromParent();
			threebtn = null;
		}
		
		public function removeEquipIconAndNotPutInBack():void
		{
			if (equipIcon)
			{
				equipIcon.removeEventListener(MouseEvent.CLICK, clickHandler);
				removeChild(equipIcon);
				equipIcon = null;
			}
		}
		
		public function getEquipIcon():RoleEquipIcon
		{
			return equipIcon;
		}
		
		private function getPlayer():PlayerDataVO
		{
			return gc.playerData;
		}
		
		private function isInBackPack():Boolean
		{
			return McUtil.hasClassInParents(this, BackPack);
		}
		
		private function getHero():BaseHero
		{
			return gc.team.getHero();
		}
		
		private function removeSomeEquip(param1:EquipmentVO):void
		{
			var targetArray:Array = [];
			switch (whichType)
			{
				case 1:
					targetArray = getPlayer().bagEquipList;
					break;
				case 2:
					targetArray = getPlayer().bagStuffList;
					break;
				case 3:
					targetArray = getPlayer().bugConsumeList;
					break;
			}
			if (ArrayUtil.contains(targetArray, param1))
			{
				ArrayUtil.removeElement(targetArray, param1)
			}
		}
		
		private function setTxt():void
		{
			numTxt.text = "";
			if (equipIcon != null && equipIcon.getEquipVO().num > 1)
			{
				numTxt.text = equipIcon.getEquipVO().num.toString();
			}
		}
		
		private function canUse():Boolean
		{
			return !(equipIcon.getEquipVO().equipId == "yll" || equipIcon.getEquipVO().equipId == "mpyj" || equipIcon.getEquipVO().equipId == "wpcsd" || equipIcon.getEquipVO().equipId == "wphhd" || equipIcon.getEquipVO().equipId == "css6" || equipIcon.getEquipVO().equipId == "css12" || equipIcon.getEquipVO().equipId == "css18" || equipIcon.getEquipVO().equipId == "wplvdyl" || equipIcon.getEquipVO().equipId.indexOf("wpsmd") != -1 || equipIcon.getEquipVO().equipId == "sbjyd" || equipIcon.getEquipVO().equipId == "jyys" || equipIcon.getEquipVO().equipId == "css_2" || equipIcon.getEquipVO().equipId == "css_3" || equipIcon.getEquipVO().equipId == "cwjnxld" || equipIcon.getEquipVO().equipId == "cwzzxld" || equipIcon.getEquipVO().equipId.indexOf("jns") != -1 || equipIcon.getEquipVO().equipId == "wphtd" || equipIcon.getEquipVO().equipId == "jyd3" || equipIcon.getEquipVO().equipId == "djyys" || equipIcon.getEquipVO().equipId == "xjyys" || equipIcon.getEquipVO().equipId == "lhys" || equipIcon.getEquipVO().equipId == "ghyb" || equipIcon.getEquipVO().equipId == "nianjhd" || equipIcon.getEquipVO().equipId == "nianjhd" || equipIcon.getEquipVO().equipId == "bx" || equipIcon.getEquipVO().equipId == "wwdgl" || equipIcon.getEquipVO().equipId == "wpxtzh")
		}
		
		private function resetSkill(param1:MouseEvent):void
		{
			/*var _loc3_:int = 0;
			var _loc5_:Array = null;
			var _loc6_:uint = 0;
			var _loc7_:int = 0;
			var _loc8_:int = 0;
			var _loc2_:PlayerDataVO = getPlayer;
			var _loc4_:int = 2;
			while (_loc4_-- > 0)
			{
				_loc6_ = (_loc5_ = String(_loc2_.isstudyskill[_loc4_].skillName).split("|")).length;
				while (_loc6_-- > 0)
				{
					var sary:Array = _loc5_[_loc6_].split("~");
					if (sary[0] != "")
					{
						_loc7_ = _loc2_.returnSkillLevelBySkillName(sary[0]) - 1;
						_loc3_ = 0;
						_loc8_ = _loc7_;
						while (_loc8_-- > 0)
						{
							_loc3_ += 150 * _loc7_ * _loc7_ * Math.sqrt(_loc7_);
							_loc7_--;
						}
						_loc2_.addLhValue(_loc3_);
					}
				}
			}
			BackPack(parent.parent.parent).setInfoTxt();
			_loc2_.isstudyskill[0].skillName = "";
			_loc2_.isstudyskill[1].skillName = "";
			_loc2_.skillbykey = [];
			removeDaoJuSobj();
			EventManager.getIns().dispatchEvent(GameEventType.REFRESH_SKILL);*/
		}
		
		private function rollOutHandler(evt:MouseEvent):void
		{
			removeThreebtn();
		}
		
		private function clickHandler(param1:MouseEvent):void
		{
			//在不同的显示模式下被点击会有不同的动作
			removeThreebtn();
			if(equipIcon)
			{
				equipIcon.removeAttribCon();
			}
			if(displayType == DISPLAY_TYPE_EQUIP)
			{
				//角色展示模式，点击直接卸下当前装备
				if(equipVO.type == EquipType.MAGIC_WEAPON && gc.isInBattle)
				{
					if (getHero().getCurMagicWeapon() && getHero().getCurMagicWeapon().isUsing())
					{
						NotificationManager.alert("当前法宝正在使用");
						return;
					}
					getHero().changeMagicWeapon();
				}
				if(equipIcon)
				{
					equipIcon.removeEventListener(MouseEvent.CLICK, clickHandler);
					removeChild(equipIcon);
					equipIcon = null;
				}
				getPlayer().takeOffEquip(equipVO);
				getHero().roleProperties.removeEquip(equipVO);
				if(equipVO.type == EquipType.MAGIC_WEAPON)
				{
					getHero().changeMagicWeapon();
				}
				equipVO = null;
				EventManager.getIns().dispatchEvent(BackPackEvent.REFRESH_BACKPACK);
			}
			else if (displayType == DISPLAY_TYPE_BAG_MESH)
			{
				//背包装备模式
				threebtn = new EquipFuncPanel();
				threebtn.x = 25;
				threebtn.y = 25;
				if (equipVO.isCanEquip)
				{
					threebtn.setMode(0);
					addChild(threebtn);
					threebtn.addEventListener(EquipFuncPanel.EVENT_SELL, sellClick);
					if (equipIcon.getEquipVO().user == "通用" || getPlayer().getRoleName() == equipIcon.getEquipVO().user)
					{
						threebtn.addEventListener(EquipFuncPanel.EVENT_EQUIP, wearClick);
					}
					else
					{
						threebtn.btn_equip.gotoAndStop(2);
					}
				}
				else if (equipVO.isCanUse)
				{
					threebtn.setMode(1);
					threebtn.addEventListener(EquipFuncPanel.EVENT_ABANDON, abandonClick);
					if (canUse())
					{
						threebtn.addEventListener(EquipFuncPanel.EVENT_USE, useClick);
					}
					else
					{
						threebtn.btn_abandon.gotoAndStop(2);
					}
				}
			}
			else if (parent.parent.parent is StrengthEquipment)
			{
				if (equipIcon.getEquipVO().equipId.indexOf("jns") != -1)
				{
					return;
				}
				gc.eventManager.dispatchEvent(new GameEvent("SimpleClick", [equipIcon]));
			}
		}
		
		private function abandonClick(param1:Event):void
		{
			removeThreebtn();
			removeSobj();
			setTxt();
			EventManager.getIns().dispatchEvent(BackPackEvent.REFRESH_BACKPACK);
		}
		
		private function wearClick(param1:Event):void
		{
			removeThreebtn();
			if (!isInBackPack())
			{
				Logger.log("不在背包内，无法穿戴");
				return;
			}
			if(equipVO.type == EquipType.MAGIC_WEAPON && gc.isInBattle)
			{
				if(getHero().getCurMagicWeapon() && getHero().getCurMagicWeapon().isUsing())
				{
					NotificationManager.alert("当前法宝正在使用");
				}
			}
			removeSobj();
			var oriVO:EquipmentVO = getPlayer().wearEquip.getEquipByType(equipVO.type);
			if(oriVO)
			{
				getHero().roleProperties.removeEquip(oriVO);
				getPlayer().takeOffEquip(oriVO);
				EventManager.getIns().dispatchEvent(BackPackEvent.REFRESH_BACKPACK);
			}
			getPlayer().putOnEquip(equipVO);
			getHero().roleProperties.addEquip(equipVO);
			if(equipVO.type == EquipType.MAGIC_WEAPON)
			{
				getHero().changeMagicWeapon();
			}
			EventManager.getIns().dispatchEvent(BackPackEvent.REFRESH_BACKPACK);
		}
		
		/**
		 * 出售功能
		 * @param param1
		 * @return
		 */
		private function sellClick(param1:Event):void
		{
			removeThreebtn();
			getPlayer().lhValue += equipIcon.getEquipVO().getPreciousValue();
			removeSobj();
			EventManager.getIns().dispatchEvent(BackPackEvent.REFRESH_BACKPACK);
		}
		
		private function useClick(param1:Event):void
		{
			var _loc2_:* = null;
			var _loc3_:* = null;
			var _loc4_:* = null;
			var _loc5_:int = 0;
			var _loc6_:* = null;
			var _loc7_:* = null;
			var _loc9_:Sprite = param1.currentTarget.parent as Sprite;
			var _loc10_:Boolean = true;
			var _loc11_:Boolean = false;
			var _loc12_:PlayerDataVO = getPlayer();
			if (_loc9_.name == "mpyj")
			{
				_loc10_ = false;
				var _loc1_:TipBox = new TipBox("确定要遗忘技能？技能升级消耗的灵魂会返还", resetSkill);
				_loc1_.add();
			}
			if (_loc9_.name == "yll")
			{
				if (gc.userData.maxStage < 4)
				{
					NotificationManager.alert("请先通过凌霄宝殿的考验！");
					return;
				}
				EventManager.getIns().dispatchEvent(BackPackEvent.CLOSE_BACKPACK);
				MainGame.getIns().destroyGame();
				GameSceneManager.getIns().switchScene(GameSceneManager.START_FIGHTING, "99_1");
			}
			else if (_loc9_.name == "wphhd")
			{
				if (_loc12_.findCurrentPet(true))
				{
					_loc12_.findCurrentPet(true).resetPetState();
					getHero().changePet();
				}
			}
			else if (_loc9_.name == "wpcsd")
			{
				_loc12_.findCurrentPet(true).lifetime += 20;
			}
			/*else if (_loc9_.name.indexOf("jns") != -1)
			{
				_loc2_ = _loc9_.name.substr(0, _loc9_.name.length - 4);
				_loc3_ = _loc9_.name.substr(_loc9_.name.length - 1, 1);
				trace("sn -->>" + _loc2_);
				trace("sl -->>" + _loc3_);
				_loc4_ = _loc12_.returnSkillIsInTheSkillAry(_loc2_);
				trace("skObj -->>" + _loc4_);
				if (_loc4_ != null)
				{
					if (_loc3_ == "2")
					{
						trace("skObj.slev  -->>" + _loc4_.slev);
						if (_loc4_.slev == 9)
						{
							_loc4_.slev = 10;
							_loc12_.setSkillLevelInTheAllSkillAry(_loc2_, 10);
							NotificationManager.alert("技能提升");
						}
						else if (_loc4_.slev == 10)
						{
							NotificationManager.alert("该技能已被提升过");
							_loc10_ = false;
						}
						else
						{
							NotificationManager.alert("等级未到9级");
							_loc10_ = false;
						}
					}
				}
				else
				{
					NotificationManager.alert("您还没学习该技能");
					_loc10_ = false;
				}
			}*/
			/*else if (_loc9_.name == "css6")
			{
				if (gc.curStage != 8)
				{
					NotificationManager.alert("必须在玲珑宝塔中使用！");
					return;
				}
				if (gc.pWorld.getBaseLevelListener() is StageListener81)
				{
					StageListener81(gc.pWorld.getBaseLevelListener()).gotoLevel(6);
				}
			}
			else if (_loc9_.name == "css12")
			{
				if (gc.curStage != 8)
				{
					NotificationManager.alert("必须在玲珑宝塔中使用！");
					return;
				}
				if (gc.pWorld.getBaseLevelListener() is StageListener81)
				{
					StageListener81(gc.pWorld.getBaseLevelListener()).gotoLevel(12);
				}
			}
			else if (_loc9_.name == "css18")
			{
				if (gc.curStage != 8)
				{
					NotificationManager.alert("必须在玲珑宝塔中使用！");
					return;
				}
				if (gc.pWorld.getBaseLevelListener() is StageListener81)
				{
					StageListener81(gc.pWorld.getBaseLevelListener()).gotoLevel(18);
				}
			}
			else if (_loc9_.name == "wplvdyl")
			{
				if (gc.curLevel >= 7 && gc.curStage == 10)
				{
					NotificationManager.alert("该关卡无法使用！");
					return;
				}
				if (gc.curStage != 10)
				{
					NotificationManager.alert("必须在水下迷宫中使用！");
					return;
				}
				if (gc.pWorld.getBaseLevelListener() is StageListener101)
				{
					StageListener101(gc.pWorld.getBaseLevelListener()).gotoLevel(7);
				}
			}
			else if (_loc9_.name.indexOf("wpsmd") != -1)
			{
				_loc5_ = int(_loc9_.name.substr(5, 1));
				if (PlayerVO(getPlayer()).immortalitylist[_loc5_ - 1].usenum < _loc5_ + 1)
				{
					PlayerVO(getPlayer()).immortalitylist[_loc5_ - 1].usenum = PlayerVO(getPlayer()).immortalitylist[_loc5_ - 1].usenum + 1;
					gc.eventManager.dispatchEvent(new GameEvent("RefreshPill"));
				}
				else
				{
					_loc10_ = false;
					NotificationManager.alert("该种丹药服用已经到上限");
				}
			}
			else if (_loc9_.name == "sbjyd")
			{
				if (_loc6_ = gc.savedBuff.getBuffByType(SingleSavedBuff.BUFF_EXP_ADD))
				{
					NotificationManager.alert("已经存在经验加成效果");
					return;
				}
				gc.savedBuff.addBuff(SingleSavedBuff.BUFF_EXP_ADD, 2, 3600 * Number(gc.frameClips));
				NotificationManager.alert("双倍经验生效");
			}
			else if (_loc9_.name == "jyd3")
			{
				if (_loc6_ = gc.savedBuff.getBuffByType(SingleSavedBuff.BUFF_EXP_ADD))
				{
					NotificationManager.alert("已经存在经验加成效果");
					return;
				}
				gc.savedBuff.addBuff(SingleSavedBuff.BUFF_EXP_ADD, 3, 3600 * Number(gc.frameClips));
				NotificationManager.alert("三倍经验生效");
			}*/
			else if (_loc9_.name == "djyys")
			{
				if (getPlayer().findCurrentPet(true) == null)
				{
					NotificationManager.alert("你还没有出战的宠物");
					return;
				}
				_loc7_ = getHero();
				_loc11_ = true;
				(_loc7_ as BaseHero).getPet().getPetData().addExp(30000);
				NotificationManager.alert("宠物增加经验30000点");
			}
			else if (_loc9_.name == "css_2")
			{
				if (gc.curStage != 12)
				{
					NotificationManager.alert("必须在兜率宫中使用！");
					return;
				}
				gc.curLevel = 3;
			}
			else if (_loc9_.name == "css_3")
			{
				if (gc.curStage != 12)
				{
					NotificationManager.alert("必须在兜率宫中使用！");
					return;
				}
				gc.curLevel = 4;
			}
			else if (_loc9_.name == "cwzzxld")
			{
				if (getPlayer.findCurrentPet(true) == null)
				{
					NotificationManager.alert("你还没有出战的宠物");
					return;
				}
				getPlayer.findCurrentPet(true).refreshThreeAttributeByImmortality();
				_loc11_ = true;
			}
			else if (_loc9_.name == "cwjnxld")
			{
				if (getPlayer.findCurrentPet(true) == null)
				{
					NotificationManager.alert("你还没有出战的宠物");
					return;
				}
				getPlayer.findCurrentPet(true).refreshPetAllSkillByLevel();
				_loc11_ = true;
			}
			else if (_loc9_.name == "wphtd")
			{
				if (getPlayer.findCurrentPet(true) == null)
				{
					NotificationManager.alert("你还没有出战的宠物");
					return;
				}
				getPlayer.findCurrentPet(true).makePetBecomeChild();
				if (gc.team.hero)
				{
					if (gc.team.hero.getPlayer() == getPlayer())
					{
						gc.team.hero.changePet();
					}
				}
				EventManager.getIns().dispatchEvent(GameEventType.REFRESH_PET);
				_loc11_ = true;
			}
			else if (_loc9_.name == "nianqld")
			{
				if (PlayerDataVO(gc.playerData).findCurrentPet(true) == null)
				{
					NotificationManager.alert("你还没有出战的宠物");
					return;
				}
				_loc11_ = true;
			}
			else if (_loc9_.name == "wpxtzh")
			{
				gc.addGardenExp(gc.playerData.level * (1 + Math.random()));
				_loc11_ = true;
			}
			else if (_loc9_.name == "nianjhd")
			{
				if (getPlayer.findCurrentPet(true) == null)
				{
					NotificationManager.alert("你还没有出战的宠物");
					return;
				}
				getPlayer.findCurrentPet(true).theFourShape();
				_loc11_ = true;
			}
			else
			{
				if (_loc9_.name == "bx")
				{
					if (getPlayer.roleId == 1)
					{
						if (Math.random() < 0.5)
						{
							gc.putQhsInBackPack(getPlayer(), "ryjgbzzs", 1);
						}
						else
						{
							gc.putQhsInBackPack(getPlayer(), "dszkzzs", 1);
						}
					}
					else if (getPlayer.roleId == 2)
					{
						if (Math.random() < 0.5)
						{
							gc.putQhsInBackPack(getPlayer(), "lhzzzs", 1);
						}
						else
						{
							gc.putQhsInBackPack(getPlayer(), "jljszzs", 1);
						}
					}
					else if (getPlayer.roleId == 3)
					{
						if (Math.random() < 0.5)
						{
							gc.putQhsInBackPack(getPlayer(), "jcdpzzs", 1);
						}
						else
						{
							gc.putQhsInBackPack(getPlayer(), "tpzyzzs", 1);
						}
					}
					else if (getPlayer.roleId == 4)
					{
						if (Math.random() < 0.6)
						{
							if (Math.random() < 0.5)
							{
								gc.putQhsInBackPack(getPlayer(), "mdflczzs", 1);
							}
							else
							{
								gc.putQhsInBackPack(getPlayer(), "mdcqgzzs", 1);
							}
						}
						else
						{
							gc.putQhsInBackPack(getPlayer(), "mdyszzs", 1);
						}
					}
				}
				else if (_loc9_.name == "wwdgl")
				{
					if (getPlayer().level < 20)
					{
						NotificationManager.alert("汪汪低等级不太好打，先到别处玩玩到20级再来打吧！");
						return;
					}
					if (gc.curStage == 1 && gc.curLevel == 1)
					{
						NotificationManager.alert("汪汪被削得这么惨还在这里打？换个地方吧");
						return;
					}
					EventManager.getIns().dispatchEvent(GameEventType.CREATE_MONSTER, {x: 100, y: 300});
				}
			}
			removeThreebtn();
			if (_loc10_)
			{
				removeDaoJuSobj();
			}
			if (_loc11_)
			{
				gc.memory.setStorage();
			}
			if (_loc9_.name == "css_2" || _loc9_.name == "css_3")
			{
			}
		}
	}
}
